Make sure to close handles.