try
    Screen('Openwindow', 0);
    HideCursor;
    WaitSecs(5);
    ShowCursor;
    WaitSecs(5);
    Screen('CloseAll');
catch
    Screen('CloseAll')
    rethrow(lasterror)
end