read map by line rather than character
Attempt to avoid complications with CR and LF characters