Change conditions for checking packages exist