improve error messages and path recation