Use getResource to open file streams