fix bug in example (should close file at all times)
2 files changed