Added check to determine if installing dependencies is required.