Replace f.f.close() calls by f.close() calls.
Add h5 files to .gitignore.