group.writers.map { writer => if (!writer.isOpen) writer.open() }

i.e. whitespae after if, and don't wrap the extra { }