Solve jshint errors on redefined 'err' variable. Added project directory
check to validate.