Add onPath suggestion by @juliandescottes and improve documentation