final Batch batch = batchManager.getActiveBatch();
while(line != null) {
batch.add(ctx.toBatchedCommand(line));
line = reader.readLine();
}
return batch.toRequest();
} catch(IOException e) {
throw new CommandFormatException("Failed to read file " + f.getAbsolutePath(), e);
} catch(CommandFormatException e) {
throw new CommandFormatException("Failed to create batch from " + f.getAbsolutePath(), e);
} finally {