formatting
call done on error