Fix scp commands in if block
Create garbage file in tmpdir