close files for simple_commands; test cases.