Added validity check for real_object inside of dereference_objects in Bundle()
Updated print_distances() to output to a file