Added function to config terminal for read/write.