if your file hello.txt is in another location , specify the absolute path to that file.
Type: Posts; User: DanBrown
if your file hello.txt is in another location , specify the absolute path to that file.
I compiled your code its running absolutely fine.
appending the content.