fixed bug in loadItems and added better logging