Added local var declaration
Added pass retry.
Added exit on read interrupt