Implemented write,read, and copy mbox* functions