Let's just use 1 fprintf instead of multiple fwrites

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>