Added h5 functionality to LNC_fileproc and fixed some bugs