updated database path and fixed creating new database