Append log file instead of rewriting
Format code