Using the block syntax ensures that the file descriptor in the OS is changed if an exception is thrown during the write.