Saving captured frames issue