Chmod to a+x and made more generic