now sending file in other thread to prevent interface hanging