config: use getc_unlocked when reading from file