Added additional 'error' handler for tls. Bumped version to v1.0.1