Minor refactoring of print statements