some tweaks, also changed throw errors into console.errors, like reply timeout and unknown command