how to check and close unused fd