Added logging, fixed typo

Logging and typo bug fix