better handling of extensions like .txt