added try catch for pipeline script