change opening file metod