Working. Creates a csv file and a master database file within the output directory.