Add debug logs for why we sync a file

Makes it easier to troubleshoot syncing issues.
Merge branch 'sync-debug' into develop

* sync-debug:
  Add debug logs for why we sync a file