Added check for secret access