Add preprocess callback