improve errors from bitcoinin
improve errors from bitcoinout
add uncaught exception handling