Modified gitignore and added minimal error handling