resolve file descriptor memory leak for wfs streams