Modified to correctly install script
Added option to supply filename for attachmnet to allow use of string