add ability to preserve eg directory