Fixed bug to open files with relative path