Fix copy issue; close gsm file object