Experiment with setvbuf()
Fix warnings