Improved logging a bit.