Added some logging stuff