Add internal logging