handles bgdist, pyerr, and pylog files