Change output file to the same directory as input file