recording and upload in intervals