Improved logging output