Add function to detect SCM