Adding truncation for log files