Add error checking for simple_transaction