When user clicks cancel do not display error message.
Improved file and error handling. Code cleanup.