handle case where filename is null