Added util functions for reading and writing XYZM files