#32 Added some debug logging for invalid actions