Add checkAndCreateDatabase