Added method to open file