Fixes for unwritable db path in production