var fetchProfileAndWriteToFile = function(readFilePath, writeFilePath) {
  return pluckFirstLineFromFile(readFilePath)
    .then(function(username) {                      //grab the result of pluckFirstLineFromFile 
      return getGitHubProfileAsync(username);       //and use it as an input for a new function
    })
    .then(function(userProfile) {                                       //grab the following result 
      return asynWrite(writeFilePath, JSON.stringify(userProfile));     //and use as input for asynWrite 
    })
    .catch(function(err) {
      console.log(err);
    });
};