add some log functionality