Take screenshot after all ajax calls are completed