Imported fwrite.