move the "where are the files" logic to the stage task

that way all the tasks have access to it. Also implement main for tasks