add documentation and dns timeout checking