added mkdir for logfiles