The var= in debug is for variables, for text you need to use msg=
So to print out the content of your file.
- debug: var=file
To print text:
- debug: msg="file exist and content of exists {{ file.stat.exists }}"
Since file is a module name, you shouldn't use that as you variable name.