Fix cache corruption with relative paths
Add cache dump option for debugging purposes