Improving print and error messaging