Fixed a logging message and added some more documentation