auto change path when open file