Added mkdir for creation of generated directory in the event it doesn't exist