FIX: Fix HD5 writing