Remove requires file
use each instead of map
use single call to stat