only set params if file open succeeded