Added buffering of debug output by default (not sure if it matters but won't hurt either).