cleaned up buffer processing, tag file names