Fixed setting of debug level with keyboard IO