enhanced log functionality