updated grader.js to write file