Fix scala reporting

- modify datastructure to optionally specify exit code