Could you please run the script with sh -x and attach the logs here, so I can have a look what's actually going wrong. Thanks