throw exceptions for invalid database file