lwinput: Remove redundant cleanup operations at closing file.