Let motion write out last picture before shutting down server