Fix bug when file is in the current directory