Intermediate magnetite formation during dehydration of goethite