fixed printf code error and started saving image thread