Improve Path validation