Differentiate between IOException due to network and due to local database