patch write hook to enable not writing on false