small fix when writing back parameters after choosing file