It might lead to wrong results to use an output template with a different samples order than the record being parsed. These few lines assure that samples order in template file will be kept!!!