Add implementation of onFileSending and onFileReceiving events.