improve error handling
add autofocus