error reporting if clause added