fix bug when filename not present