read/write for configuration and aagrid files