Tweak file put logic