You can add your file by wrapping it inside a folder and, therefore, saving the name of the source file. Try:
$ ipfs add -w example.txt
added QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH example.txt
added QmVFDXxAEC5iQ9ptb36dxzpNsQjVatvxhG44wK7PpRzsDE
, MerkleDAG Node, , . , :)