add debug info && halt if inpu mode doesn't exist