need to make output and log directories if they don't exists