I tried the first bit of your code and it ran fine (except for out being out of scope when you tried to close() it) - file was created and contained verbose time.
Are you sure you are looking at the correct file? Check the file's timestamp to be sure it is actually the one being created/updated.
He's dead Jim. Grab his tricorder. I'll get his wallet and this tiny ad: