Update fclose for command tests