Thank you Bejoy! Following your code examples, it finally works.
Actually I only changed two places in my original code. First, I added the "Override" tag. Second, I added a new exception catch(FileNotFoundException e), and now it works! I appreciate your kind and precise help. Best, Shi