Fix problems with file() method in Message class