Rewrote the exception handling in command pipeline
Minor