Add support for pretrans script