Added file exist check; naming fix