try {
waitFor(process);
final ByteArrayInputStream bais = new ByteArrayInputStream(stdout.toByteArray());
bi = new PNMReader().open(bais);
streamHandler.stop();
} catch (ThreadDeath t) {
LOGGER.error(t.getMessage(), t);
process.destroy();
throw t;
} finally {