Add a check if the target output directories exist