updated program to output hello world to a file