Added error param to callback