Added a check of existing file path