Add logging output and move method into decorator.