handled error on checkIfDatabaseStarted