move write files for debugging purposes to on demand tasks in Gruntfiles