changed outputdirectory to target directory