Finishing read file dialog function