Printing error reason in warning