Moved check for data directory so its always checked