remove file close to fix issue #604

closing the file keeps the profiling from writing out to the file.