Fix typo in middleware logging
Make object.getAccessKeys implementation more functional