Fixed code for filename construction.