diff --git a/lib/SLUB/LZA/Rosetta/TA.pm b/lib/SLUB/LZA/Rosetta/TA.pm
index f12c97d01417e6eb8fb094e670ff2fba473ac695..3bd3eb935bd0b6795a0b52ffb18d8a08d56f3943 100644
--- a/lib/SLUB/LZA/Rosetta/TA.pm
+++ b/lib/SLUB/LZA/Rosetta/TA.pm
@@ -49,7 +49,11 @@ BEGIN {
 }
 
 END {
-    YAML::DumpFile($cache_path, %cache);
+    if ($cache_path->parent->is_dir && !$cache_path->parent->parent->is_rootdir && $cache_path->touch()) {
+        YAML::DumpFile($cache_path, %cache)
+    } else {
+        warn "The $cache_path could not be written, because dir ".$cache_path->parent()." is not writeable";
+    }
 }
 
 1;