Declare $project_name as global in write_hdf5()