Since hgetContents is lazy, closing the file with hClose makes the result of hgetContents to be unexpected. Where should the hClose be put ? -- Ahn Ki-yung