added callbacks for load, save, saveAs in haskell version