Return early for folder listings in PostRequestEncryptionHook

We don't need to worry about more things in this case.
Add some debug messages
Add InfoLogger and ErrorLogger for logging
Port logging to the new logger classes
go fmt: Remove empty line
Log errors on internal failures