Changed Exception types in IOSDatabaseManager and added a debug statement