Yes to both questions: It can normally not be caused by an Internet failure when I think this through, and contractCheck is indeed the function that triggers the "Lapse" message when the option position was not found.

But this does not answer the question why contractCheck did not find the option position on your accout at 18:15, but did find it before. Can you contact Support? They will try to reproduce that problem with your script.