generate proper patch and removed old file