Got file opening and closing to work