Buffers do not always get closed.

In the runtime, prediction, score, and other files are opened up and used as buffers.

    if 'scores' not in skip_arguments:
        score_parser.add_argument(
            '-c', '--scores', type=utils.FileType('w', encoding='utf8'), default='-', action='store',
            help="save scores to a file, default stdout",
        )
scores.to_csv(arguments.scores)

However, they are not handled with a context manager or ever explicitly closed. This is causing some scores and predictions to not get written to disk (although I am still debugging of why they do sometimes and not other times)

I would vote for either referencing file args as strings and using context managers everywhere, or after the runtime, go through and make sure that all files are closed.