allow user to pass error into done callback