catch panic from encoder for deserialization of bad input; add timeouts for r/w to conn