Replace library paths substring checks with Gotham versions