preprocessOutfun function

Pre-process outfun argument.