make it safe to use fprintf