finish error handling for sample parser