code: function loadContent(file, parser)
  {
    var content, config;
  
    try
    {
      content = stripBOM(fs.readFileSync(file, {encoding: 'utf8'}));
      // provide file path as the second argument for complex parsing,
      // also it matches `module._compile` nodejs API.
      // Note: JSON.parse accepts two arguments, but ignores anything
      // but function on the second place, so it's safe to pass a filename
      // Other parsers might need to have wrappers.
      config = parser(content, file);
    }
    catch (e)
    {
      throw new Error('Config file ' + file + ' cannot be read or malformed: ' + e.message);
    }
  
    return config;
  }
docs: Loads and parses provided file (synchronous).
  
  @param   {string} file - absolute path to the file
  @param   {function} parser - function to parse provided content and return config object
  @returns {object} - parsed config object