not a function, but a var
move buffer-modification into the result handler
Only insert error on connection-failed
fix not handling the first query properly