Added HashResultTest and tested writeFile function