Automatic leak detection for new and old machines