fixed typo
added debug print mode