switched to File handles rather than Strings