Moved chunk changing / saving out of loop