Why add a '/' to the end of the file? If it is a file, this will return a wrong path?