Hydrogen behavior in graphite at elevated temperatures