Added a test on writeToFile in FileHandlerTest