reassign filename variable inside of ruby block