For "OpenFile", The documentation states that: "This method doesn't return any data." So result being undefined seems like what you should expect.
"OpenFile"
result
undefined