partially merged with nithin, with invoked_directory global variable.
removed errors and bugs. Changed path problem from physical layer.