Created a dir for macs2 to log error msg to, and wrapped installation process in two functions