Fix database file