Added error callback and interval config