file client test fix 3: close stream and socket