Added echo functionality and write the information back to the client.