debug export errors and handle it