Better way to open files