read and write using a daemon