Fixed usage of existsSync method (path -> fs)