added trigger_error to create directory function calls