Removed DeleteFile function and replaced calls to Kill with FileSystemObject.DeleteFile