Error handling for timeouts
Added delay between writes