Fix a typo and an issue with logging permissions

Suggested reviewer: @illiatsi