addFileWithSameHash(): Check in database instead of status.