Adding fig file type detection, exclude doc tags