Added filename checks in output boxes.