finished debugging for new file output