Cherry-pick: Close IO handles and file descriptors more quietly