Use configurable fprintf and output stream for debugging