resolves #556 print warning/error messages using warn