use the after hook to make sure to only cleanup the local file once