Todo functions with fwrite capability