added check
added logging to loadObject