core/io: switch FileReader and FileWriter to work with standard traits