Add logging to study processing

Tiny change but useful for debugging.
Sounds good! Just a note that don't try to get all tests in a single PR.
I'll download this branch and test it locally, so everything works correct before merging