fix check dir when install
create common and foundation file