add thread to save pictures