#322: properly define 'filename' outside 'if-else' block