Fixed a relative path bugs to open files