Shorter exception message on invalid file argument

Information about what is allowed in the "file" argument should be
written into the docstring, not into the error message.