public void store(Object objectToStore) {
        if (objectToStore == null) {
            throw new IllegalArgumentException("The argument may not be null.");
        }

        try {
            createDirectoriesIfNew();
            serialize(objectToStore);
        } catch (IOException ex) {
            throw new StorageException("Could not serialize and store the given object: " + ex.getMessage());
        }
    }