add error report functions