Finished file output, db_conn() done but insert still needs to be done as well as database creation if not exists. Almost done with overall functionality