solved error when no database file exists