Preprocessing data from different file types