Save build logs on error