Formated code. Removed getInputStream and getOutputStream because we don't need it. Edited the error messages because logger is not in robot code lib.