use Handler interface and bug fix for log calldepth