Changed detect to look for magic file.