Error/warning message should not be printed to System.err but collected instead