Add option to save some objects to output file