Added file/repo existence checks