supporting txt files, adding preprocess flag