Pre-processing of files