Add in some logging code