improved error handling

added catch for loading with nothing in db