Added support for correct filename output