fixing issue with file exist operation in monitoring