pass Library instead of libraryDirectory to OnlineDatabase and use it to check for redundant entries, if a redundant entry happens, don't save the remote id;