Added logging statements.