adjusted error reporting to display nicer