add error log and process