Add check for magic