fix file name generation
fix hive conf
use hive build in fetch
clean up code