Right now there are many conditions in which history files get left around with the .inprogress extension. The cleaner doesn't remove these because it can't distinguish between something running and left over abandoned files.
There are cases its really hard to not leave these around (application killed/crashes/etc). But we should still try to handle the history files better.
For instance we could first write them to the .sparkStaging directory and then moving to the history file location before the application finishes. That way you only get completed history files.