This creates a race condition. The file should not be removed.