Added some error handling for permissions and missing ledger files.