DP-3181-fixes : Changed function for checking file existing