libembroidery error logging and cleanup.