Do not run cleanup while printing is ongoing.
Merge pull request #5001 from CodingFabian/issue-4994

Do not run cleanup while printing is ongoing.