Throw exeption instead of making null-check every time

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>
Optimize the exception handling, minimize the scope for multiple steps

Only hand over the IDataManager instead of the full network manager when
it's not necessary

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>
Fixing the AddFileTest

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>