Added second argument as null if there is error.