Changed database creation check