Added error handling.
Added npm debug to gitignore