Function checkWebPage with callback added