Added extra checks and support for URL fetching in grader.js