Write file using grunt API