Replace (f)printf with (f)puts
Style improvements
Print all errors to stdout