generalised IO routines for binary and cmi disc data and wrote functions to compute correlations