add function of choosing file