added functionality to dump to file, and can detect ordinals,still testing