Added listener code as well as Logger

If your function is returning a `boolean` then ideally name should start with `Is`. In this case it should be `IsValidPath`