Added better logging statements.