Writer adapted in order not to write elements without values (like
depency etc.).
Stream writer added.