need to wrap in try ... finally block and close the parser