Written first implementation of generateConfigFile, including successfully calling hook. Works only for me though.
Changed /home/ird28 to System.getProperty("user.home")