Taken out the write logic from makesum function. Added update flag.
Added hashfile flag.