SERVER-9762 Detect and return errors from stream in parseConfigFile and properly terminate loop