Changed how hosts are added to the inventory
Optimized inventory save function to only use one file write