Addressed review comment: ensured that FileReader is closed.