Remove unnecessary cast.
Update a comment.
KNF
Don't lose a failed return just because the close-on-error succeeds.