print appropriate message if user see error