Would it be better to move it down a few lines after the report is finished? Basically, make this the last thing that happens within that last function? That way there is no chance of having intermixing console output form another task.