Use writefln instead of printf, Fix #79