storage: Fixes logging deadlock