should exclude typ instead of basename