function onChange(path, stats) {
		// run image processor
		var img = proc(path)
		// output filename based on input
		var outfile = output + /[^/\\]*$/.exec(path)[0]
		// save output
		img.write(outfile, function(err) {
			if (err) console.error('GM Error: ', err)
		})
	}
// on file add or change, start the magic
on file add or change, start the magic
on file add or change start the magic
function onChange(path, stats) {
		var img = proc(path)
		var outfile = output + /[^/\\]*$/.exec(path)[0]
		img.write(outfile, function(err) {
			if (err) console.error('GM Error: ', err)
		})
	}
function onChange ( path , stats ) { var img = proc ( path ) var outfile = output + / [^/\\]*$ / . exec ( path ) [ 0 ] img . write ( outfile , function ( err ) { if ( err ) console . error ( 'GM Error: ' , err ) } ) }
on file add or change, start the magic
on file add or change start the magic
// run image processor // output filename based on input // save output