Add before_process callback