Correct program close on save picture from webcam