Fix bug on file_exist method