Improved log method