In place of File.Delete(filePath); Use below code
System.GC.Collect();System.GC.WaitForPendingFinalizers();File.Delete(filePath);
In place of File.Delete(filePath); Use below code
System.GC.Collect();System.GC.WaitForPendingFinalizers();File.Delete(filePath);