Give path default value to prevent UnboundLocalError

Fix #504