Added writing capability. Now the program can save user's word