Only edit document, if it has been changed

Change-Id: If3903a9a547724f7b57bfcb13cea1251eb047ed1
Signed-off-by: Simon Scholz <simon.scholz@vogella.com>