gzip: change file open modes