Network:fix memory leak for pullFile and remote logging