add support for magic file type detection