Locally published workflow run in Tray Robot not working as it does in Studio

Tried for several hours to debug and find solutions to this so forgive me if it does turn out to be a duplicate of a thread. Please find the issue below!

Scenario: Running a workflow from Studio with 100% completion while the exact same workflow published to local Tray Robot failing several parts of the workflow.

Steps to reproduce: Create a workflow that uses a shortcut macro (or click steps, as long as the file gets the text) to print the current screen’s text of a terminal emulator (using Attachmate Reflection) to txt file. Read that same file and put the value into a variable and do some logic on it. I’m printing the value in WriteLine as well as do some regex parsing on the full string.

Current Behavior: The text file gets the text just fine but reading the file seems to break, no error is thrown there’s just nothing in the variables (looking at logs). When running the workflow in Studio I get the entire flow to work flawlessly every time (ruling out race condition in the flow itself).

Expected Behavior: Same behavior as can be observed when running from Studio.

Studio/Robot/ Version: 2017.16522

Last stable behavior:
Last stable version:
OS Version: Win 10
Others if Relevant: (workflow, logs, .net version, service pack, etc):

Ok so I just noticed some of my variables retain their value between the times the workflow is run. I reset the variables before they get any new data but they still keep their old values… The txt file in this case is constantly up to date with what should be put into the variables and they look fine when debugging but when run via the Tray Robot the old values come back (looking at logs). So my logic is run on old data which ofc breaks the entire flow.

Any insight into this is greatly appreciated!

EDIT: Turns out when using relative path (worked when running manually through Studio) the values can get corrupted and changing all relative paths to files to absolute paths solved this issue for me!