finish assignDirectory; update for adding image suffix