Changed reportcommon: more robust error handling