Updated .gitignore
Updated error handling.