throw exception for warnings when they are not written to STDERR