cleanup log
fix bad file creation