Added try catch when sending files; so that exception is expected.
This is when the recepient closes the socket connection.