updated exception handling and gitignore