Updated TeaSafeFile to use global image stream (optimization)