changed how file are picked to use the correct target folder