added file check for adding dependency