added debug messages for input handler