Added cleanup to allow multiple users to run the script. Auto chowning if sudo is available