Added some logging statements.