Closing file after parsing