Fix one bug in FileSenderClient

Add sleep in the background thread.
Add boolean to test whether the socket is successfully listened