Added the support of chmod errors