Fix logging issues for large logs