fix opening files