improve group files script