Fixed #23888 -- Forced File.__repr__ to return string

You can remove this comment.