Fixed issue where database file was not being checked to exist