#31 added failure on copy dir to file