Added more log statements.
Documentation.