Set target file properly