Had a problem with 'yes' command so I changed it to echo 'y'