 				spec = yaml.safeLoad fs.readFileSync(spec_filename, 'utf8')
 			
 			# parse spec variables
-			spec = parse spec, project, output.processor
+			console.log "Processed spec.".blue
+			if project.debug
+				console.log "    - Before:".green
+				console.log JSON.stringify spec[i], null, "  "
+			spec = parse spec, project, output_processor
+			if project.debug
+				console.log "    - After:".green
+				console.log JSON.stringify spec[i], null, "  "
 			
 		# validate spec
 		if generator.schema

					spec[i] = project[s.substr(1)]
		if processors and processors.length
			for processor in processors
				spec[i] = processor spec[i]
	spec

sortObject = (object) ->

	if !imports
		throw new Error 'No imports available for output'
	
	for output_i of outputs
		output = outputs[output_i]
		
		# validate generator
		if !output.generator
			throw new Error "Generator is required for output in project (#{project.id})"
		else if !imports[output.generator]
			throw new Error "Generator (#{output.generator}) does not exist for output in project (#{project.id})"
		
		console.log "\nOutput ##{parseInt(output_i)+1}: #{output.generator}".bold
		
		# load generator from imports
		generator = imports[output.generator]

		# load processors
		output_processor = output.processor
		generator_processor = generator.processor
		if generator_processor
			if typeof(output_processor) == 'string'
				output_processor = [output_processor]
			if typeof(generator_processor) == 'string'
				generator_processor = [generator_processor]
				
			if output_processor && generator_processor
				output_processor = extend true, true, output_processor, generator_processor
			else
				output_processor = generator_processor
		
		if output_processor instanceof Array
			processors = []
			
			for processor in output_processor
				if !imports[processor]
					throw new Error "Import does not exist for alias (#{processor})"
				
				processors.push {
					alias: processor
					callback: imports[processor].processor
				}
			
			output_processor = processors
			
		else if typeof(output_processor) == 'string'
			if !imports[output_processor]
				throw new Error "Import does not exist for alias (#{output_processor})"
				
			output_processor = [{
				alias: output_processor
				callback: imports[output_processor].processor
			}]

		# load spec from file
		spec = {}
