fix swap_file usage