fixed typo / added logging