Bugfixes to standardize on output filenames