added read maps routines and split out fileio