Add timeout to prevent facter hanging issue

Add timeout to prevent facter hanging issue