fixed sed and missing dir