Added more error printouts and fixed bug where some hostdir numbers were not found