 	# Generate
 	generate: (next) ->
 		# Check
-		if docpad.genetating then return
-		else docpad.generating = true
-
+		if docpad.generating
+			console.log 'Generate request received, but we are already busy generating...'
+			return
+		else
+			console.log 'Generating...'
+			docpad.generating = true
+		
 		# Continue
 		path.exists docpad.options.srcPath, (exists) ->
 			# Check
-			if not exists then throw Error 'Cannot generate website as the src dir was not found'
-
+			if exists is false
+				throw new Error 'Cannot generate website as the src dir was not found'
+			
+			# Log
+			console.log 'Cleaning the out path'
+			
 			# Continue
-			util.rmdir docpad.options.outPath, (err) ->
-				throw err if err
+			util.rmdir docpad.options.outPath, (err,list,tree) ->
+				if err
+					console.log 'Failed to clean the out path '+docpad.options.outPath
+					throw err
+				console.log 'Cleaned the out path'
 				docpad.generateClean ->
 					docpad.generateParse ->
 						docpad.generateRelations ->

	
	# Watch
	watch: (next) ->
		# Watch the src directory
		watch.createMonitor docpad.options.srcPath, (monitor) ->
			
			# File Changed
			monitor.on 'changed', (fileFullPath,newStat,oldStat) ->
				docpad.generate ->

async = require 'async'
watch = require 'watch'
util = require 'bal-util'
sys = require 'sys'
mongoose = require 'mongoose'
Schema = mongoose.Schema 
SchemaTypes = Schema.Types 
