Improve buildfile type identification