add formatted write function writefln()