cleaning up the printing and log viewing