added close action to stderr