Short python script to protect against incomplete remote writes