added thumbnail support
added configuration file
1. image previews now work. 2. Added debugging codes to 'unknown error' message so you can easily find where the error is in code (otherwise all errors are the same).
added ability to download image