error handling for an empty database and .gitignore .env