* will be persisted beyond MOE execution. So any results persisted beyond a top-level Task
* constitute outputs of MOE execution.
*/
public void popTaskAndPersist(Task task, File persistentResult) {
if (AppContext.RUN.fileSystem != null) {
Lifetime newLifetime;
if (stack.size() == 1) {
newLifetime = Lifetimes.persistent();
} else {
Task parentTask = Iterables.get(stack, 1);
newLifetime = new TaskLifetime(parentTask);