When using Resource.moveOverwrite there is a problem

When running the task, at the beginning of the task and at the end it is used the function Resource.moveOverwrite but the issue is that only at the end, sometimes there is an error and sometimes there is not, when the error appears the file is left where it was. We printed the two parameters of the function just before calling the function and they are ok, they exist. We made tests with the same file multiple times and the output was sometimes having the error, sometimes not having it.

Here is the error:
org.webharvest.exception.PluginException: [urn:uuid:1EFF6A9C05CD0D76CD15972685266852581] robotics-flow executePlugin exception: [nodeId=3e18b045aca92416987cbe196a9bcd8ahttp://127.0.0.1:5000] org.webharvest.exception.ScriptException:
Config line 57: script block
org.openqa.selenium.WebDriverException: Build info: version: ‘9.4.0.3’, revision: ‘abf2ebe0f1’, time: ‘2019-05-29T13:21:06.482Z’
System info: host: ‘LAUSU.com’, ip: ‘127.0.0.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘3.10.0-957.5.1.el7.x86_64’, java.version: ‘1.8.0_144’
Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper
Capabilities [{capabilityNodeId=http://127.0.0.1:5000, extra.executor.id={run.name=LTM, task.uuid=96d64806-4b84-497b-9e3f-04248eecef70, task.name=LATAM v0.0.4, context.path=/workfusion, host.name=latam.com, run.author.email=r@r.com, run.uuid=2a33b2e8-29d6-4379-8145-4f45c27b5ad2, run.author.fullname=Ro}, CLOSE_ALL_WINDOWS=false, browserName=universal, maximize.on.startup=true, javascriptEnabled=true, extra.capabilities.context={“browserType”:“universal”,“startInPrivate”:false,“blockImages”:false,“nodeId”:“3e18b045aca92416987cbe196a9bcd8ahttp://127.0.0.1:5000”,“maximizeOnStartup”:true,“customCapabilities”:{“SEARCH_ALL_WINDOWS”:“true”,“CLOSE_ALL_WINDOWS”:“false”},“executorId”:{“host.name”:“latam.com”,“context.path”:"/workfusion",“task.uuid”:“96d64806-4b84-497b-9e3f-04248eecef70”,“run.name”:“LTM”,“run.uuid”:“2a33b2e8-29d6-4379-8145-4f45c27b5ad2”,“run.author.fullname”:“Ro”,“run.author.email”:"r@r.com",“task.name”:“LATAM v0.0.4”}}, platformName=WINDOWS, SEARCH_ALL_WINDOWS=true, version=1.0, platform=WINDOWS}]
Session ID: 3e18b045aca92416987cbe196a9bcd8a4bbb9d67-dd74-44d0-9fb5-b21525980f69
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RoboticsFlowPlugin.executePlugin(RoboticsFlowPlugin.java:121)
at org.webharvest.runtime.processors.WebHarvestPlugin.execute(WebHarvestPlugin.java:125)
at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127)
at org.webharvest.runtime.Scraper.execute(Scraper.java:169)
at org.webharvest.runtime.Scraper.execute(Scraper.java:182)
at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:173)
at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:116)
at com.workfusion.service.machine.BotRecordExecutionService.process(BotRecordExecutionService.java:171)
at com.workfusion.service.machine.BotRecordExecutionService.process(BotRecordExecutionService.java:142)
at com.workfusion.service.machine.BotRecordExecutionService.lambda$processSubmissionWithAllocationLogger$3(BotRecordExecutionService.java:112)
at com.workfusion.utils.thread.ThreadMonitoringUtils.executeWithAllocatedMemoryCallback(ThreadMonitoringUtils.java:17)
at com.workfusion.service.machine.BotRecordExecutionService.processSubmissionWithAllocationLogger(BotRecordExecutionService.java:112)
at com.workfusion.service.machine.BotRecordExecutionService.lambda$processRecord$0(BotRecordExecutionService.java:95)
at com.workfusion.utils.thread.NamedThreadTemplate.executeWithNamedThread(NamedThreadTemplate.java:10)
at com.workfusion.service.machine.BotRecordExecutionService.processRecord(BotRecordExecutionService.java:95)
at com.workfusion.service.machine.thread.RecordProcessThread.run(RecordProcessThread.java:28)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.webharvest.exception.PluginException: org.webharvest.exception.ScriptException:
Config line 57: script block
org.openqa.selenium.WebDriverException: Build info: version: ‘9.4.0.3’, revision: ‘abf2ebe0f1’, time: ‘2019-05-29T13:21:06.482Z’
System info: host: ‘LAUSU.com’, ip: ‘127.0.0.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘3.10.0-957.5.1.el7.x86_64’, java.version: ‘1.8.0_144’
Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper
Capabilities [{capabilityNodeId=http://127.0.0.1:5000, extra.executor.id={run.name=LTM, task.uuid=96d64806-4b84-497b-9e3f-04248eecef70, task.name=LATAM v0.0.4, context.path=/workfusion, host.name=latam.com, run.author.email=r@r.com, run.uuid=2a33b2e8-29d6-4379-8145-4f45c27b5ad2, run.author.fullname=Ro}, CLOSE_ALL_WINDOWS=false, browserName=universal, maximize.on.startup=true, javascriptEnabled=true, extra.capabilities.context={“browserType”:“universal”,“startInPrivate”:false,“blockImages”:false,“nodeId”:“3e18b045aca92416987cbe196a9bcd8ahttp://127.0.0.1:5000”,“maximizeOnStartup”:true,“customCapabilities”:{“SEARCH_ALL_WINDOWS”:“true”,“CLOSE_ALL_WINDOWS”:“false”},“executorId”:{“host.name”:“latam.com”,“context.path”:"/workfusion",“task.uuid”:“96d64806-4b84-497b-9e3f-04248eecef70”,“run.name”:“LTM”,“run.uuid”:“2a33b2e8-29d6-4379-8145-4f45c27b5ad2”,“run.author.fullname”:“Ro”,“run.author.email”:"r@r.com",“task.name”:“LATAM v0.0.4”}}, platformName=WINDOWS, SEARCH_ALL_WINDOWS=true, version=1.0, platform=WINDOWS}]
Session ID: 3e18b045aca92416987cbe196a9bcd8a4bbb9d67-dd74-44d0-9fb5-b21525980f69
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotPlugin.executePlugin(RobotPlugin.java:185)
at org.webharvest.runtime.processors.WebHarvestPlugin.execute(WebHarvestPlugin.java:125)
at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127)
at org.webharvest.runtime.processors.BodyProcessor.execute(BodyProcessor.java:27)
at org.webharvest.runtime.processors.WebHarvestPlugin.executeBody(WebHarvestPlugin.java:246)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RoboticsFlowPlugin.executePlugin(RoboticsFlowPlugin.java:110)
… 18 more
Caused by: org.webharvest.exception.ScriptException:
Config line 57: script block
org.openqa.selenium.WebDriverException: Build info: version: ‘9.4.0.3’, revision: ‘abf2ebe0f1’, time: ‘2019-05-29T13:21:06.482Z’
System info: host: ‘LAUSU.com’, ip: ‘127.0.0.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘3.10.0-957.5.1.el7.x86_64’, java.version: ‘1.8.0_144’
Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper
Capabilities [{capabilityNodeId=http://127.0.0.1:5000, extra.executor.id={run.name=LTM, task.uuid=96d64806-4b84-497b-9e3f-04248eecef70, task.name=LATAM v0.0.4, context.path=/workfusion, host.name=latam.com, run.author.email=r@r.com, run.uuid=2a33b2e8-29d6-4379-8145-4f45c27b5ad2, run.author.fullname=Ro}, CLOSE_ALL_WINDOWS=false, browserName=universal, maximize.on.startup=true, javascriptEnabled=true, extra.capabilities.context={“browserType”:“universal”,“startInPrivate”:false,“blockImages”:false,“nodeId”:“3e18b045aca92416987cbe196a9bcd8ahttp://127.0.0.1:5000”,“maximizeOnStartup”:true,“customCapabilities”:{“SEARCH_ALL_WINDOWS”:“true”,“CLOSE_ALL_WINDOWS”:“false”},“executorId”:{“host.name”:“latam.com”,“context.path”:"/workfusion",“task.uuid”:“96d64806-4b84-497b-9e3f-04248eecef70”,“run.name”:“LTM”,“run.uuid”:“2a33b2e8-29d6-4379-8145-4f45c27b5ad2”,“run.author.fullname”:“Ro”,“run.author.email”:"r@r.com",“task.name”:“LATAM v0.0.4”}}, platformName=WINDOWS, SEARCH_ALL_WINDOWS=true, version=1.0, platform=WINDOWS}]
Session ID: 3e18b045aca92416987cbe196a9bcd8a4bbb9d67-dd74-44d0-9fb5-b21525980f69
at org.webharvest.runtime.scripting.GroovyScriptEngine.eval(GroovyScriptEngine.java:138)
at org.webharvest.runtime.processors.ScriptProcessor.execute(ScriptProcessor.java:74)
at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127)
at org.webharvest.runtime.processors.BodyProcessor.execute(BodyProcessor.java:27)
at org.webharvest.runtime.processors.WebHarvestPlugin.executeBody(WebHarvestPlugin.java:246)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotPlugin.executePlugin(RobotPlugin.java:178)
… 23 more
Caused by: org.openqa.selenium.WebDriverException: Build info: version: ‘9.4.0.3’, revision: ‘abf2ebe0f1’, time: ‘2019-05-29T13:21:06.482Z’
System info: host: ‘LAUSU.com’, ip: ‘127.0.0.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘3.10.0-957.5.1.el7.x86_64’, java.version: ‘1.8.0_144’
Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper
Capabilities [{capabilityNodeId=http://127.0.0.1:5000, extra.executor.id={run.name=LTM, task.uuid=96d64806-4b84-497b-9e3f-04248eecef70, task.name=LATAM v0.0.4, context.path=/workfusion, host.name=latam.com, run.author.email=r@r.com, run.uuid=2a33b2e8-29d6-4379-8145-4f45c27b5ad2, run.author.fullname=Ro}, CLOSE_ALL_WINDOWS=false, browserName=universal, maximize.on.startup=true, javascriptEnabled=true, extra.capabilities.context={“browserType”:“universal”,“startInPrivate”:false,“blockImages”:false,“nodeId”:“3e18b045aca92416987cbe196a9bcd8ahttp://127.0.0.1:5000”,“maximizeOnStartup”:true,“customCapabilities”:{“SEARCH_ALL_WINDOWS”:“true”,“CLOSE_ALL_WINDOWS”:“false”},“executorId”:{“host.name”:“latam.com”,“context.path”:"/workfusion",“task.uuid”:“96d64806-4b84-497b-9e3f-04248eecef70”,“run.name”:“LTM”,“run.uuid”:“2a33b2e8-29d6-4379-8145-4f45c27b5ad2”,“run.author.fullname”:“Ro”,“run.author.email”:"r@r.com",“task.name”:“LATAM v0.0.4”}}, platformName=WINDOWS, SEARCH_ALL_WINDOWS=true, version=1.0, platform=WINDOWS}]
Session ID: 3e18b045aca92416987cbe196a9bcd8a4bbb9d67-dd74-44d0-9fb5-b21525980f69
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:775)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:677)
at com.workfusion.rpa.helpers.Resource.moveOverwrite(Resource.java:355)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:237)
at Script11_genScript_11127.run(Script11_genScript_11127.groovy:1152)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:444)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:482)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:453)
at org.webharvest.runtime.scripting.GroovyScriptEngine.eval(GroovyScriptEngine.java:136)
… 28 more