Make pre and post actions generation optional