Give path default value to prevent UnboundLocalError