Simplify use of exec. Return 1 on errors.