Changed service to accept a String stream as input, which laters saves
in a file.