Add logging to study processing

Tiny change but useful for debugging.