Close open file handles