Added logging system, debug messages for key inputs