Improved logging system