Fixed small problem with the filename, now it outputs most of the path upto the root directory