Changed from System.IO to native cake methods