reopening stdout and stderr to the socket
print instead of puts in slave