mask_payload function clause removed, log added