create log dir, add env variables to delayed job