minor fix for printing error messages