Export File now works. Refractored file manipulation to sofiehdfformat.