Added die calls after cp and sed