HIVE added testing code, added missing checks for put.