integrated timeout monitor and removed socket close as it was causing a segfault at end of transfer