Added file type detection for XML