Fixed crash when no database file exists