Building the analysis file (step 1: load the datafile)