adding callback function to retrieve current path as string