fixed how output file are opened and closed for statepoint and source files
checked different combinations of HDF5 and MPI with intel and fixed bugs