Add logging throughout