open and delete files