Resolves crash caused by non writable directory