Fixed bug and cleaned up debug information in load assets function