Fixed file opening