rsync works in separate threads. dirty commented-out version. needs huge code format and refactoring