If an error occured in this function, we will emit the error out, and call the done function that was passed in.