Updated to check for database path then create if it not there