Extract preprocessing logic into a separate method; introduce new return code ERROR_WHILE_REPORTING