save out preprocessed file