set path on input change event