How to Fix Error Printing Message