Changed error handling, moved AppData path handler to a new class