Made filename check fail; It was misinterpreted by me. Added more or less graceful pausing of session before shutting down.