Do the logfile in a way that makes older python versions happy