- add mode argument to sat_xfopen* functions