Fixed file opening on linux