refactored stat test
implemented fs.exists