@Override
public void run() {
final StatusBar statusBar = getApplication().getAppFrame().getStatusBar();
try {
do {
ScreenImage image = images.take();
File file = nextName();
ImageIO.write(image.toBufferedImage(), format, file);
getLog().info("Screenshot saved " + file);
statusBar.message("Saved %s", file.getName());
} while (capturing.get());
} catch (InterruptedException ignore) {
} catch (IOException e) {