Maybe use fprintf?