Fix bugs clean up cache files