Roberto,
The file plugin readFile() method wants to show a file selection dialog is the file argument is null or does not exist.
When the file argument exists, it just reads the file without UI and so without headless exception.
So, I guess in that one server something is wrong with the file argument.
Hope this helps,
Rob