Fix autosave behavior

Fixed autosave behavior in runtrials.py