added case-based file naming and saving, need to do restarts still