better base_name for files in preprocess
Fixed conflicts in preprocess