Fix stringification of errors for logging
Log exceptions from transfers in daemon process
Refactor tests