Use C-style I/O instead of streams

Signed-off-by: Thorben Hasenpusch <thorben.hasenpusch@gmail.com>