Add logging to papply