Thread data saving (BYDLOCODE EDITION)