use os.remove instead of __del__ to properly delete the temporary file