fix warning on no directory
better implementation of sender/receiver cli app