add import button and ensure error status is correctly set on error