Sonarr wont overwrite existing files

Sonarr version (exact version): 4.0.10.2544
Mono version (if Sonarr is not running on Windows):
OS: Windows 10
Debug logs:
Description of issue:

I have no issues downloading shows but the issue I’m facing is if Sonarr discovers a better quality file it will download it no issue but it wont delete the old file and replace it with the new file, I have tried both Manual Import and Automatic Import but the only way I can get Sonarr to move the files is to find the old file and delete it then run a Manual Update.

The only thing I can see in the logs is the below error.

[v4.0.10.2544] System.UnauthorizedAccessException: Access to the path ‘M:\Shows\The Simpsons\Season 36\S36E01.mkv’ is denied.
at System.IO.FileSystem.DeleteFile(String fullPath)
at System.IO.File.Delete(String path)
at NzbDrone.Common.Disk.DiskProviderBase.DeleteFile(String path) in ./Sonarr.Common/Disk/DiskProviderBase.cs:line 208
at NzbDrone.Core.MediaFiles.RecycleBinProvider.DeleteFile(String path, String subfolder) in ./Sonarr.Core/MediaFiles/RecycleBinProvider.cs:line 83
at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode, Boolean copyOnly) in ./Sonarr.Core/MediaFiles/UpgradeMediaFileService.cs:line 65
at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem, ImportMode importMode) in ./Sonarr.Core/MediaFiles/EpisodeImport/ImportApprovedEpisodes.cs:line 159

Debug Log: sonarr.trace · GitHub

Looks like the user running Sonarr doesn’t have permissions to that file, if you’re running Sonarr as a Windows service you may want to switch to a tray application or change the user that Sonarr is running as.

It’s strange because I only have a single admin user on the pc so it should have all permissions, I’ll try switching version and see if that fixes it