added sanity checks and database file installation