fixed error protocol and machine record existence check