added retrieve test but it seems cretre has still a problem, since the data does not exist ;)
fixed writing of files using a filehandle instead of a simple Inputstream method