Add logging to debug exporting
Merge branch 'master' into staging