Issue #5214: Add checking the file and moving log text