Try and make socat quieter when it dies and add debugging to the script overall.