Access locals and fix path issue