fix crash when task is an url not a file