add logging boilerplate