Added a check for db already created