Fix a bug causing the script to fail when the log files got too large