RunAutomaticTasks problem - Failed to delete directory

Hi,
We are trying to run few Automatic Tasks (from API) after creating the project but during (probably) cleaning after one of the actions Trados throw exception:

ERROR 2015-05-21 03:06:36 (null) (null) AutomaticTaskExecuter – Failed to delete directory 'C:\Users\X\AppData\Local\Temp\tmp6206', max retry count reached.
System.IO.IOException: The process cannot access the file 'aaa.pdf.sdlxliff' because it is being used by another process.
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
at Sdl.ProjectApi.Implementation.AutomaticTaskExecuter.RobustDeleteDirectory(String dir)

it shows randomly so we can not determine which of the actions could be the problem. Any ideas?

Best regards,

Wojciech Tutro