tune fit parameters and print out return code; restore ability to specify just the file number