capture errors in load