Issue131

Main purpose of the work in this branch is to fix "Issue #131 allow the user to repair corrupted files". Additionally there are some minor changes, e. g. in error messages or data storage.