Added a basic read/modify/write into main loop