Use "with" statement to close files