fix output file's path