chmod +x and fix bug in new script