I don´t understand the question.
Anyway. You should return FALSE if the permission is not given.
ONLY use the external storage if you got a TRUE result.
The relevant Tutorial is this
Remember that that a call to Sleep or Wait For in a resumable sub causes the code flow to return to the parent. Example: Sub Button1_Click Sum(1, 2) Log("after sum") End Sub Sub Sum(a As Int, b As Int) Sleep(100) 'this will cause the code flow to return to the parent Log(a + b) End Sub...