Modified permissions, added error case to decoding hostnames