Maybe this'll be enough for a working installer?
Fix glaring syntax error and add some debug output
Fix missing third parameter error
Add missing isInstalled code
Different debug info